﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Messhall.Framework.Domain.DomainObject
{
    /// <summary>
    /// 所有领域实体都需要继承
    /// </summary>
    public abstract class EntityBoBase : EntityBase
    {
        public DateTime CreateTime { get; set; } = DateTime.Now;

        public string CreateName { get; set; }

        public DateTime UpdateTime { get; set; } = DateTime.Now;

        public string UpdateName { get; set; }

        public byte[] RowVersion { get; set; }

        //public void SetCreateTime(DateTime? dateTime = null)
        //{
        //    this.CreateTime = dateTime.HasValue ? dateTime.Value : DateTime.Now;
        //}

        //public void SetUpdateTime(DateTime? dateTime = null)
        //{
        //    this.UpdateTime = dateTime.HasValue ? dateTime.Value : DateTime.Now;
        //}
        //public void SetIsDelete(bool isDelete)
        //{
        //    this.IsDelete = isDelete;
        //}
    }
}